<!DOCTYPE html>
<html >
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    function Parent(){
        this.country = '中国';
        this.language = '普通话';

    }
    function Child(name,age){
        this.name = name;
        this.age = age;
        //修改父类构造函数中的this，指向子构造函数中的对象
        //然后调用父构造函数，以添加属性
        Parent.call(this);
    }
    let zs = new Child('张三',22);
    console.log(zs);
    
</script>
</html>